let vm = new Vue({
    el: "#app",
    data: {
        username: '',
        password: '',
        remembered: '',

        error_username: false,
        error_password: false,

    },

    methods: {
        on_submit: function () {

        },
        check_username: function () {

        },

        check_password: function () {

        },

        qq_login: function () {
            let next = get_query_string('next') || '/';
            let url = '/qq/login/?next=' + next;
            console.log(url)
            axios.get(url, {
                responseType: 'json'
            }).then(response => {
                if (response.data.code == '0') {
                    window.location.href = response.data.login_url;
                }
            }).catch(error => {
                console.error(error.response)
            })
        },
    }
})